<template>
    <view class='page'>
        <z-paging ref="paging" v-model="dataList" @query="getList">

            <!-- 订单列表 -->
            <view class="user-list">
                <view class="list">
                    <view>
                        <text class="p">用户</text>
                    </view>
                    <view>
                        <text class="p">时间</text>
                    </view>
                </view>
            </view>
            <view class="user-list">
                <view class="list" v-for="(item, index) in dataList" :key="index" @click="onOrderList(item.order_no)">
                    <view class="boxl">
                        <view class="pic">
                            <image :src="item.user.avatar" mode="widthFix"></image>
                        </view>
                        <text class="p">{{item.user.name}}</text>
                    </view>
                    <view class="boxr">
                        <text>{{item.create_time}}</text>
                    </view>
                </view>
            </view>
        </z-paging>
    </view>
</template>
<script>
import {
    getInviteLists
} from "@/api/my/index.js"
export default {
    components: {},
    data() {
        return {
            dataList: [
               
            ],
            queryParams: {
                page: 1,
                limit: 20,
            },
        };
    },
    onLoad(options) {

    },
    methods: {
        getList(page) {
            this.queryParams.page = page
            getInviteLists(this.queryParams).then(res => {
                let data = res.data.lists
                this.$refs.paging.complete(data);
            }).catch(err => {
                this.$refs.paging.complete(false);
            })
        },
    },
};
</script>
<style scoped lang='scss'>
.user-list {
  .list {
    padding: 30rpx;
    border-bottom: solid 1px #bdbdbd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    view {
      text {
        display: block;
        font-size: 25rpx;
        color: #a2a1a2;
      }
      .p {
        color: #262626;
      }
    }
    .boxl {
      display: flex;
      align-items: center;
      .pic {
        width: 103rpx;
        height: 103rpx;
        border-radius: 50%;
        overflow: hidden;
        margin-right: 20rpx;
        image {
          width: 100%;
        }
      }
    }
  }
}
</style>